DATA README MASTER FILE: "FORECASTER (MIS-)BEHAVIOR" 
/_data

[1] SOFTWARE AND COMPUTER
All tables and figures are created using RStudio (version 1.2.1335) running R (version 3.6.0) and MATLAB (R2018b). The computer used is a 2017 i5 MacBook Pro with 16GB RAM. The file "packages_rstudio.R" in the main data folder (/_data)  installs the packages needed to run the .R files. Neither of the programs should take substantial time to run. 

Please note that individual .R files automatically detect and set your working directory. Because RStudio locks this directory the first time that you run a file in a given folder, one has to restart RStudio before running .R files in another folder.


[2] FOLDER STRUCTURE OF /_DATA

[2.1] MAIN
This folder contains the files used to produce all figures and tables in Section 2, Section 4:Table II, Section 5:Figure 3, and Online Appendix B, D, and G. The readme in this folder explains the function of each file. All data used are publicly available.


[2.2] /_INDIVIDUAL_DATA 
	* /_SPFRAWDATA
This folder contains raw data on (i) individual SPF forecasts and (ii) realtime realizations of macro outcomes, as well as (iii) the files used to clean the raw data. The readme in this subfolder explains the function of each file. 

The raw data from the Survey of Professional Forecasters (SPF) can be downloaded here: https://www.philadelphiafed.org/surveys-and-data/real-time-data-research/survey-of-professional-forecasters.
[click "individual" next to "Download all variables:", then click "Surveys 1968:4-present".] 

The raw data on realtime realizations of macro outcomes (RGDP, CPI, PGDP) used to compute year-over-year values can be downloaded here: https://www.philadelphiafed.org/surveys-and-data/real-time-data-research/error-statistics. [click e.g., "Data" next to "Real Gross National Product/Gross Domestic Product (RGDP)".] 

	* /_OTHERRAWDATA
This folder contains raw data on (i) individual Livingston Survey forecast and individual EA SPF forecasts, as well as (ii) realtime realizations of US and EA macro outcomes. Finally, the folder also contains (iii) the files used to clean the raw data. The readme in this subfolder explains the function of each file. 

The raw data from the Livingston Survey can be downloaded here: https://www.philadelphiafed.org/surveys-and-data/real-time-data-research//livingston-historical-data. [click "Individual Data".]

The raw data from the EA Survey of Professional Forecasters (EA SPF) can be downloaded here: https://www.ecb.europa.eu/stats/ecb_surveys/survey_of_professional_forecasters/html/all_data.en.html
[click "Download as CSV" under the heading "Microdata for all rounds".]

The raw data on realtime realizations of macro outcomes for the US can be downloaded here: https://www.philadelphiafed.org/surveys-and-data/real-time-data-research/error-statistics. [click e.g. "Data" next to "Real Gross National Product/Gross Domestic Product (RGDP)".] 

The raw data  on realtime realizations of macro outcomes for the EA can be downloaded here: https://sdw.ecb.europa.eu/quickview.do?SERIES_KEY=194.RTD.M.S0.N.P_C_OV.A and here https://sdw.ecb.europa.eu/quickview.do?SERIES_KEY=194.RTD.Q.S0.S.G_GDPM_TO_C.E.

	* /_PROB_DENSITIES
This folder contains raw data on (i) individual SPF histograms of one-year-ahead annual-average GDP deflator inflation and (ii) the corresponding realizations. The readme in this subfolder explains each file. 

The raw data from the SPF can be downloaded here: https://www.philadelphiafed.org/surveys-and-data/real-time-data-research/survey-of-professional-forecasters.
[click "Download one variable at a time" below "BASELINE VARIABLES", then click "Probability of Changes in GDP Price index (PRPGDP)".] 

The raw data on GDP deflator realizations can be downloaded here: https://fred.stlouisfed.org
[search and click: "GDPDEF".


[2.3] /_AVERAGE_DATA 
	* /_SPFRAWDATA
This folder contains raw data on (i) average SPF forecasts and (ii) realtime realizations of macro outcomes, as well as (iii) the files used to clean the raw data. The readme in this subfolder explains the function of each file used to clean the data. The raw data is downloaded from the same online location as the individual level data [click "mean" next to "Download all variables:" in the aforementioned link, then click "Mean Forecast Data for Levels".] The data on realtime realizations is the same. 

	* /_OTHERRAWDATA
This folder contains raw data on (i) average Livingston Survey forecast and average EA SPF forecasts, as well as (ii) realtime realizations of US and EA macro outcomes. Finally, the folder also contains (iii) the files used to clean the raw data. The readme in this subfolder explains the function of each file. 

For the Livingston Survey and the EA SPF, the raw survey data is downloaded from the same online location as the individual level data sets. For the EA SPF: click e.g., "Real GDP growth" forecasts in the aforementioned link. For Livingston Survey: click "Mean Data" in the aforementioned link.


[2.4] /_OTHER_DATA
	* /_NZ
This folder contains raw data on (i) CPI inflation in New Zealand (see the readme in this folder).

The raw data on CPI realizations can be downloaded here: https://fred.stlouisfed.org
[search and click: "NZLCPIALLQINMEI".]

	* /_ZEW
This folder contains raw data on (i) realizations of the ZEW, (ii) consensus forecasts of the ZEW, as well as (iii) consensus forecasts of the consensus forecast of the ZEW. Finally, the folder also contains data on Real GDP in Germany. The readme in this subfolder explains the function of each file.

The raw data on German GDP realizations can be downloaded here: https://fred.stlouisfed.org
[search and click: "CLVMNACSCAB1GQDE".]

The raw expectation data for the ZEW has been downloaded over BLOOMBERG (code: GRZEWI and GRZECURR). The raw data on realizations has been downloaded here: https://www.zew.de/publikationen/zew-gutachten-und-forschungsberichte/forschungsberichte/konjunktur/zew-finanzmarktreport [click: Historische Datenreihe]. 

	* /_PUBLIC_SIGNALS
		/_SURVEY_VARIABLES
		* US
This folder contains raw data on (i) average SPF and Livingston forecasts, (ii) average forecasts from the Michigan Survey of Consumers, as well as (iii) average forecasts from the Survey of Consumer Expectations. All forecasts are of one-year ahead inflation. Finally, the folder also contains the files used to clean the raw data. The readme in this subfolder explains the function of each file. 

The raw data on average SPF and Livingston forecasts is the same as that described above.

For the Michigan Surveys of Consumers, the raw survey data can be downloaded here: [Table 32] https://data.sca.isr.umich.edu/data-archive/mine.php [Quarterly data with start of mean forecast from 1979 onwards].

For the Survey of Consumer Expectations, the raw survey data can be dowloaded here: [median one-year ahead expected inflation rate] https://www.newyorkfed.org/microeconomics/sce#/ [click: "Inflation Expectations" then click "Downloads".]

		* EA
The folder, furthermore, contains raw data on (i) average EA SPF forecasts, (ii) implied one-year ahead inflation expectations from EA inflation swaps, and (iii) average one-year ahead inflation forecasts from the European Commission's Survey of European Consumers. Finally, the folder also contains the files used to clean the raw data. The readme in this subfolder explains the function of each file. 

The raw data on average EA SPF is the same as that described above.

The raw data on one-year ahead inflation expectations from EA inflation swaps is from BLOOMBERG's Inflation SWAPS main page.

The raw data on EA consumer expectations can be downloaded here: https://ec.europa.eu/info/business-economy-euro/indicators-statistics/economic-databases/business-and-consumer-surveys/download-business-and-consumer-survey-data/time-series_en [Click "ZIP" next to "Qualitative and Quantitative Inflation Perceptions" .

		/_HARD_VARIABLES
		* US
This folder contains raw data on (i) the public signals used in Figure 2, (ii) .R data frames with the cleaned data, as well as  the files used to clean the raw data. The readme in this subfolder explains the function of each file.

For the real S&P Comp., the raw data can be downloaded here: http://www.econ.yale.edu/~shiller/data.htm [click "ONLINE DATA"].

For the 10Y3M term spread, the raw data can be downloaded here: https://fred.stlouisfed.org [search and click "T10Y3M"].

For the unemployment rate, the raw data can be downloaded here: https://fred.stlouisfed.org [search and click "UNRATE"].

For the WTI oil price, the raw data can be downloaded here: https://fred.stlouisfed.org [search and click "WTISPLC"].

For the import price index, the raw data can be downloaded here: https://fred.stlouisfed.org [search and click "IR"].

For 10-yr breakeven inflation rates, the raw data can be downloaded here: https://fred.stlouisfed.org [search and click "T10YIE"].

For the nominal effective exchange rate, the raw data can be downloaded here: https://www.bis.org/statistics/eer.htm [click "Monthly data: Narrow indices xlsx"].

For the Cleveland Fed's financial-market based inflation expectations, the raw data can be downloaded here: https://www.clevelandfed.org/our-research/indicators-and-data/inflation-expectations.aspx [click "download our spreadsheet"].

		* EA
This folder contains raw data on (i) the public signals used in Figure B.1, (ii) .R data frames with the cleaned data, as well as  the files used to clean the raw data. The readme in this subfolder explains the function of each file.

For the DAX, the raw data can be downloaded here: https://finance.yahoo.com/quote/%5EGDAXI/history/?guccounter=1&guce_referrer=aHR0cHM6Ly93d3cuZ29vZ2xlLmNvbS8&guce_referrer_sig=AQAAAAL-053oFRghhPfR15KBBnbdpmkhQoO6D_9ZJ_oN2nkDNxG-mw0ZKftVdmQv39mFKeI0jlEQp0K0BZxuGHavDvFgO7u2C_Pn2_HxvGvnkYWhgZcSzmerapIwQ64-rC1oC6El_i9tIPCzaBrtuHe-gGIjcQPZQdzzt6aX0dE6dfZ5 [click "Download"].

For the import price index, the raw data can be downloaded here: https://sdw.ecb.europa.eu/browse.do?node=9691218 [key STS.M.I8.N.IMPX.2C0000.4.000].

For the EURUSD rate, the raw data can be downloaded here: https://fred.stlouisfed.org [search and click "EXUSEU"].

For the Brent oil price, the raw data can be downloaded here: https://fred.stlouisfed.org [search and click "DCOILBRENTEU"]. 

For the unemployment rate, the raw data can be downloaded here: https://fred.stlouisfed.org [search and click "LRHUTTTTEZM156S"].

For the 10Y3M Term spread, the raw data can be downloaded here: https://fred.stlouisfed.org [search and click "IRLTLT01DEM156N" and "IR3TIB01DEM156N"].


[2.5] /_FIGURES 
This folder contains .eps and .pdf versions of outputted figures. 


[2.6] /_TABLES 
This folder contains .txt version of outputted tables. 
